/**
 * Charles 20161113
 */
$(function(){
	vmMian=new Vue({
		el: '#contentBody',
		data:{
			userInfo:{},
			downCourseLis:[],
		},
		methods:{
			
		},
	});
	var urlStr=location.search;
	 var parObj = new Object();
    if (urlStr.indexOf("?") != -1) {
        urlPara = urlStr.substr(urlStr.indexOf("?") + 1).split("&");
    }
    for (var i = 0; i < urlPara.length; i++) {
        parObj[urlPara[i].split("=")[0].toString()] = urlPara[i].split("=")[1].toString();
    }
	$.ajax({
        type: "post",
        url: "getUser",
        dataType: "json",
        data: { userid: parObj["userid"]},
        success: function (result) {
        	if(result)
        	{
        		vmMian.userInfo=result;
        	} 
        },
        error: function () {
            alert("data request errror!");
            return false;
        }
     });
	
	$.ajax({
        type: "post",
        url: "findMyDownLoadSubject",
        dataType: "json",
        data: {},
        success: function (result) {
        	if(result){
        		vmMian.downCourseLis=result;
        	}
        	else 
        		vmMian.downCourseLis=[];
        		
        },
        error: function () {
            alert("data request errror!");
            return false;
        }
     });
});
